#include <iostream>
#include <math.h>

const int degree2minute = 60;
const int minute2second = 60;

int main() {
	using std::cout;
	using std::cin;
	using std::endl;
	int degrees = 0, minutes = 0, seconds = 0;

	cout << "Enter a latitude in degrees, minutes, and seconds: " << endl;
	cout << "First, enter the degrees: ";
	cin >> degrees;
	cout << "Next, enter the minutes of arc: ";
	cin >> minutes;
	cout << "Finally, enter the seconds of arc: ";
	cin >> seconds;

	double result = degrees + minutes / static_cast<double>(degree2minute) + seconds / static_cast<double>(minute2second) / degree2minute;
	cout << degrees << " degrees, "
		<< minutes << " minutes, "
		<< seconds << " seconds = "
		<< result
		<< " degrees";
	return 0;
}